<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
	<h:head>
		<title>Chamados</title>
	</h:head>
	<h:body style="text-align: center">
		<div align="center">
			<h2 style="text-align: center">Chamados</h2>

			<h:panelGrid columnClasses="acent">

				<rich:extendedDataTable value="#{chamado.tabelaChamados}"
					var="chamado" id="tabela" >

					<rich:column>
						<f:facet name="header">
							<h:outputText value="Abertura" />
						</f:facet>
						<h:outputText value="#{chamado.abertura}">
							<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
						</h:outputText>
					</rich:column>
					<rich:column>
						<f:facet name="header">
							<h:outputText value="Fechamento" />
						</f:facet>
						<h:outputText value="#{chamado.fechamento}">
							<f:convertDateTime type="date" pattern="dd/MM/yyyy" />
						</h:outputText>
					</rich:column>
					<rich:column>
						<f:facet name="header">
							<h:outputText value="Descrição" />
						</f:facet>
						<h:outputText value="#{chamado.descricao}" />
					</rich:column>
					<rich:column>
						<f:facet name="header">
							<h:outputText value="Funcionario" />
						</f:facet>
						<h:outputText value="#{chamado.funcionario.nome}" />
					</rich:column>
					<rich:column>
						<f:facet name="header">
							<h:outputText value="Máquina" />
						</f:facet>
						<h:outputText value="#{chamado.maquina.nome}" />
					</rich:column>
					<rich:column>
						<f:facet name="header">
							<h:outputText value="Defeito" />
						</f:facet>
						<h:outputText value="#{chamado.tipoDefeito.nome}" />
					</rich:column>

				</rich:extendedDataTable>
				<rich:dataScroller for="tabela"/>
			</h:panelGrid>

			<br></br>
			<h:outputLink value="index.xhtml">
				<f:verbatim>Voltar</f:verbatim>
			</h:outputLink>
		</div>
	</h:body>

</ui:composition>